/**
 * Witontek.com.
 * Copyright (c) 2012-2017 All Rights Reserved.
 */
package test.random;

/**
 * 
 * @author Long
 * @version $Id: RandomString.java, v 0.1 2017年7月15日 下午6:56:41  xiaolong.ma  Exp $
 */
public class RandomString {

    /**
     * 
     * @param args
     */
    public static void main(String[] args) {
        String randomcode2 = "";
        String model = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        char[] m = model.toCharArray();

        for (int j = 0; j < 6; j++) {
            char c = m[(int) (Math.random() * model.length())];
            randomcode2 = randomcode2 + c;
        }

        System.out.println(randomcode2);
    }

}
